@extends('back_end.layouts.default_info')

{{-- Web site Title --}}
@section('title')
{{{ Lang::get('general.back_end.menu') }}} @if (isset($entry)){{{Lang::get('general.edit') }}}@else{{{Lang::get('general.create') }}}@endif :: @parent
@stop
@section('content_header')
{{{ Lang::get('general.back_end.menu') }}} @if (isset($entry)){{{Lang::get('general.edit') }}}@else{{{Lang::get('general.create') }}}@endif
@stop
{{-- breadcrumb --}}
@section('breadcrumb')
<li><a href="#"><i class="fa fa-dashboard"></i> {{{ Lang::get('general.back_end.home') }}}</a></li>
<li class="active">{{{ Lang::get('general.back_end.menu') }}} @if (isset($entry)){{{Lang::get('general.edit') }}}@else{{{Lang::get('general.create') }}}@endif</li>
@stop

{{-- Content --}}
@section('content')
<div class="box box-primary">

  {{-- Create Form --}}
    @if(isset($entry))
    {{ Form::open(array('action' => array('BackMenuController@doUpdate',$entry->id))) }}
    @else
    {{ Form::open(array('action' => 'BackMenuController@doCreate')) }}
    @endif
    <div class="box-body">
      <!-- Tabs -->
      <ul class="nav nav-tabs">
        <li class="active"><a href="#tab-general" data-toggle="tab">基本信息</a></li>
      </ul>
      <!-- ./ tabs -->


      <!-- Tabs Content -->
      <div class="tab-content">
        <!-- General tab -->
        <div class="tab-pane active" id="tab-general">
          <br/>
            {{ $tab_index = 1 ? '' : '' }}
            {{ $tab_index++ }}
            {{ Form::textGroup('name',  Menu::$column['name'],   Input::old('name', isset($entry) ? $entry->name : ''),   $errors, $tab_index++, true) }}

            {{ Form::textGroup('keyword',  Menu::$column['keyword'],   Input::old('keyword', isset($entry) ? $entry->keyword : ''),   $errors, $tab_index++, true) }}

            {{ '' //Form::selectGroup('parent_id', Menu::$column['parent_id'], ServiceBase::prepareSelectGroupDisplayForSearch(Menu::all(), 'name',  array('0'=>'顶级菜单')), Input::old('parent_id', (isset($entry) ? $entry->parent_id : 0) ), $errors, $tab_index++) }}

        </div>
        <!-- ./ general tab -->

      </div>
      <!-- ./ tabs content -->

      {{ Form::submitButtonGroup('BackMenuController@getIndex', (Auth::user()->can('create_menu')||Auth::user()->can('update_menu')) , $tab_index) }}

      <!-- ./ form actions -->
    </div>
    {{ Form::close() }}
</div>
@stop


{{-- Scripts --}}
@section('scripts')
<script type="text/javascript">

    $(function () {

    });
</script>
@stop